//
//  @ Project : Galaxy Star Trading System
//  @ File Name : DataSeries.h
//  @ Date : 2014/9/5
//  @ Author :
//
//
#if !defined(_DATA_SERIES_H_H)
#define _DATA_SERIES_H_H

namespace GSTrader
{
	namespace Indicator
	{
		class INDICATOR_API CDataSeries : public CSeries
		{
		public:
			CDataSeries();
			CDataSeries(CDataSeries* pSrc);
			CDataSeries(int nNumData, int nStartIndex = 0);
			virtual ~CDataSeries();

			void Initialize();
			void SetSize(int nNumData, int nStartIndex = 0);

			bool CaclMaxMinValue(double& dMin, double& dMax, int nStart, int nEnd);
			void SetData(double dData, int nDataType = dtFloat);
			void Clone(CDataSeries* pSrc);

			virtual double GetValue(int index, int bardata);
			virtual double GetValueByIndex(int index);
			bool SetValue(int nIdex, double dValue);

			virtual int GetCount();

		public:
			vector<double> m_vData;
			int m_nDataType;
			
		};
	}
}
#endif // _DATA_SERIES_H_H